//
//  URLModel.m
//  HKKG
//
//  Created by zhongweiMacPro on 2021/8/21.
//  Copyright © 2021 李良林. All rights reserved.
//

#import "URLModel.h"
#import "JQFMDB.h"


#define xioakfmdb [NSString stringWithFormat:@"xioakfmdb"]

@implementation URLModel

- (void)saveUserInfo {
    BOOL saveSucces = [[JQFMDB shareDatabase] jq_insertTable:xioakfmdb dicOrModel:self];
    if (saveSucces) {
        
        NSLog(@"保存成功");
    }else {
        NSLog(@"保存失败");
    }
}

//获取用户信息
+ (NSArray *)getUserInfo {

    return [[JQFMDB shareDatabase] jq_lookupTable:xioakfmdb dicOrModel:self whereFormat:nil];
}

//删除用户信息
+ (void)deleteUserInfoWith:(URLModel *)url {
    
    [[JQFMDB shareDatabase] jq_deleteTable:xioakfmdb whereFormat:@"where urlData = '%@'",url.urlData];
}

@end
